home *** CD-ROM | disk | FTP | other *** search
/ Shareware Grab Bag / Shareware Grab Bag.iso / 098 / strew.dqc / strew.doc
Encoding:
Text File  |  1985-04-23  |  40.0 KB  |  934 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7.     File STREW.TXT, Reformated from STREW.DOC                            Page 1
  8.  
  9.  
  10.                                                      STREW    
  11.  
  12.                                               A full screen editor...
  13.                                               A file separator...
  14.                                               A file extractor...
  15.                                               A file reformater...
  16.                                               An RBBS upload manager...
  17.  
  18.                                            Version 1.1.  SEPTEMBER 28, 1984.
  19.  
  20.                                                  Copyright (c) 1984
  21.  
  22.                                                     Ken Goosens
  23.                                                 5020 Portsmouth Road
  24.                                                 Fairfax, VA 22032
  25.  
  26.  
  27.  
  28.     TABLE OF CONTENTS
  29.  
  30.  
  31.     Conditions of Use...............................................
  32.  
  33.     What STREW Does.................................................
  34.  
  35.     A Quick Tutorial................................................
  36.  
  37.     Limitations.....................................................
  38.  
  39.     Installation....................................................
  40.  
  41.     Running STREW...................................................
  42.  
  43.     How STREW Normally Works........................................
  44.  
  45.     Configuring STREW...............................................
  46.  
  47.     General Strew Configuration.....................................
  48.  
  49.     RBBS Configuration..............................................
  50.  
  51.     Editing Commands................................................
  52.  
  53.     Using Strew with RBBS...........................................
  54.  
  55.     Modifying STREW.................................................
  56.  
  57.  
  58.  
  59.  
  60.  
  61.  
  62.  
  63.  
  64.     File STREW.TXT, Reformated from STREW.DOC                            Page 2
  65.  
  66.  
  67.     CONDITIONS OF USE
  68.  
  69.     You are free to use and distribute this program provided
  70.          (a) the copyright notice is not altered or removed.
  71.          (b) nothing is charged for its distribution.
  72.  
  73.     If you make any fixes to STREW, please send them to the author in
  74.     a form of a documented merge file so that they can be incorporated
  75.     into an official version and distributed to other users.  Suggestions
  76.     for enhancements will also be appreciated and probably be implemented.
  77.     The author does support this program, so please report any problems
  78.     you have with the program or the documentation.  The author can be
  79.     reached on the following public bulletin board number: 202-537-7475.
  80.  
  81.     No warranty is implied with this program.  Any user takes full respons-
  82.     ibility for its use.
  83.  
  84.     There are seven files with this system.
  85.  
  86.     STREW.BAS   -  Source code.  Written in Microsoft BASIC for IBM PC
  87.     STREW.DOC   -  Documentation (this document)
  88.     STREW.EXE   -  Compiled version.  Uses IBM's BASIC compiler
  89.     QPRINT.BIN  -  Assembler program for use with interpreter
  90.     QPRINT.OBJ  -  Assembler program for use with compiled version
  91.     EXAMPLE.STW -  Example of a configuration file
  92.     PLAN.DAT    -  Example of a data file to be strewed (see tutorial)
  93.  
  94.     STREW is written in IBM Basic and has been tested by its author only
  95.     on the IBM PC under DOS 2.1.  It should run on all IBM PCs and compat-
  96.     ibles, however.  BASIC was chosen so that the user community could
  97.     modify and improve the product.
  98.  
  99.  
  100.  
  101.  
  102.  
  103.  
  104.  
  105.  
  106.     File STREW.TXT, Reformated from STREW.DOC                            Page 3
  107.  
  108.  
  109.     WHAT STREW DOES
  110.  
  111.     STREW.BAS is a different kind of full screen editor.  It combines
  112.     elements of text editors, data base managers, and spreadsheets.
  113.     It differs significantly from other editors in several respects.
  114.  
  115.         MOST OTHER EDITORS                     STREW
  116.  
  117.     Lines saved to same file          Lines saved to same or different
  118.  
  119.     A line saved to one file          A line saved to one or more
  120.  
  121.      Line is variable length record    Divided into fixed length fields
  122.  
  123.     Reads all files same way          Specify how each file to be read
  124.  
  125.     Read in entire file               Select columns to read in
  126.  
  127.     Displays line as is               Separates fields with spaces
  128.  
  129.     No labels                         Labels the columns
  130.  
  131.     Saves file in one format          Specify field and record separators,
  132.                                       whether field quoted
  133.  
  134.     Saves only as seen on screen      User controls order fields written
  135.  
  136.     Reads only lines < 256 chars      Unlimited line length on read
  137.  
  138.     Stores only line < 256 chars      Stores to 7901 chars from a line
  139.  
  140.     Runs interactively only           Interactive or batch
  141.  
  142.     (1)     Other  editors force all lines being saved to go into the same
  143.     file.  STREW relaxes this assumption:   not  only  can  each  line  be
  144.     saved  to a different file, but the same line can be saved to multiple
  145.     files.  STREW will therefore "strew" the lines  in  a  file  to  other
  146.     files.
  147.  
  148.     (2)   Other editors treat your lines as one continuous variable length
  149.     record.  STREW treats your  input  record  as  discrete  fixed  length
  150.     fields,  The  operational  differences are that STREW will not let you
  151.     lengthen a field, and when a field is shortened, STREW will not  close
  152.     up the text by drawing characters from fields to the right.
  153.  
  154.     (3)     Other  editors  read  in all of your input file.  STREW allows
  155.     you to specify which columns in  the  input  file  you  want  to  get.
  156.     STREW  can  therefore  selectively  extract  the pertinent part of the
  157.     data that is needed.
  158.  
  159.  
  160.  
  161.  
  162.  
  163.  
  164.     File STREW.TXT, Reformated from STREW.DOC                            Page 4
  165.  
  166.  
  167.     (4)   Other editors display  your  text  as  one  continuous  variable
  168.     length  string.   STREW  displays  the text in fields of fixed length,
  169.     with spaces between the fields, in a column with a  label:  much  like
  170.     a spreadsheet.  (STREW has horizontal scrolling.)
  171.  
  172.     (5)     Most  other  editors save your file in one format only.  STREW
  173.     allows the data to be saved in different formats.  The options include:
  174.     (a) whether the records are  fixed  length  or  variable  length,  (b)
  175.     what  the  separator between fields is, (c) what the separator between
  176.     records is, (d) what fields, if  any,  are  to  have  quotes  inserted
  177.      around  them,  and  (e)  in  what order the displayed fields are to be
  178.     written out.
  179.  
  180.     (6)   Other editors are limited in the length of lines they  can  read
  181.     and  store.   Usually  the  limit  is  between 132 and 255 characters.
  182.     STREW can read through a  line  of  any  length  whatsoever,  although
  183.     it  cannot  store  all  of  the information.  It will store up to 7901
  184.     characters (99 x 80) of information from a line for editing and saving.
  185.  
  186.     (7)   Most editors can  be  run  interactively  only.   By  specifying
  187.     that  the  maximum  number  of  lines on the screen is zero, strew can
  188.     be run as a batch program.  This is primarily useful if all  you  want
  189.     to  do  is  to  reformat  a file or to separate out lines in a file by
  190.     a field in the file.
  191.  
  192.     STREW therefore does the following types of tasks uniquely well  among
  193.     text editors.
  194.  
  195.          (1)   Splitting out lines in a file.
  196.  
  197.          (2)   Displaying and editing fixed length records.
  198.  
  199.          (3)   Reformating files with fixed length records.
  200.  
  201.          (4)   Extracting only needed fields.
  202.  
  203.     STREW  also  has  a  specially configured option called "RBBS" for use
  204.     with the Remote Bulletin Board System (RBBS).  It allows the  operator
  205.     of  the  host  system  to  review the list of uploaded files, edit the
  206.     entries, and specify what other  directory  files  the  lines  in  the
  207.     uploaded  list  are  to  be  appended  to.  This utility makes it very
  208.     easy to manage uploaded files.
  209.  
  210.  
  211.  
  212.  
  213.  
  214.  
  215.  
  216.     File STREW.TXT, Reformated from STREW.DOC                            Page 5
  217.  
  218.  
  219.     STREW is especially useful for formatting mainframe  files  downloaded
  220.     to a PC.  For example, STREW can be easily used to
  221.  
  222.          (1)  Add  spaces  between  fields  so  that  the file can be read
  223.               into 123.
  224.  
  225.          (2)  Reorder fields.  For example, if a date comes down in MMDDYY
  226.               format  and  you  need  it in YYMMDD, just read in each part
  227.               as a separate field and change the order in which the fields
  228.               are written out.
  229.  
  230.          (3)  Convert a fixed length file to a comma separated file.
  231.  
  232.          (4)  Extract only needed fields from a large record.
  233.  
  234.          (5)  Break  up  the  fields into discretely displayed and labeled
  235.               columns,  making it each  to  spot  check  downloaded  files
  236.               of any size to see whether the information is as expected.
  237.  
  238.  
  239.  
  240.  
  241.  
  242.  
  243.  
  244.  
  245.     File STREW.TXT, Reformated from STREW.DOC                            Page 6
  246.  
  247.  
  248.     A QUICK TUTORIAL
  249.  
  250.     You  need  to  work  with some data residing on the mainframe.  A dump
  251.     of the file has been prepared  for  you,  which  you  have  downloaded
  252.     to  disk.   Like  many  mainframe  files,  the data is stored in fixed
  253.     length fields.  The layout is as follows.
  254.  
  255.                        meaning      length  data type
  256.  
  257.                      cost center       3      text
  258.                         level          2      text
  259.                         number         2      numeric
  260.                         title         16      text
  261.                     min salary         6      numeric
  262.                     max salary         6      numeric
  263.  
  264.     Each record consists of  information  about  planned  staffing  levels
  265.     by  cost  center  in  a corporation, and includes the cost center, the
  266.     level of a position, the number of positions at  that  level  in  that
  267.     cost  center,  the  title  of  the position, and a minimum and maximum
  268.     salary level for that position.
  269.  
  270.     The data is stored in file PLAN.DAT.  You need  to  do  three  things:
  271.     visually  check the data,  reformat the data so that a space separates
  272.     the fields and the text fields are put in quotes so  that  it  can  be
  273.     read into a spreadsheet, and to split out the data by cost center.
  274.  
  275.     The  first  thing  you  need  to  do is to create a configuration file
  276.     for PLAN.DAT.  At DOS type "STREW<rtn>"  and  the  select  option  "C"
  277.     for  "configure"  by  entering  "C<rtn>".   The "<rtn>" means to press
  278.     the enter key.  You will  be  prompted  for  the  file  to  configure.
  279.     Respond  "PLAN<rtn>".   Then  you  will be asked if you want to create
  280.     the new configuration file by editing a previous one.  Type  "EXAMPLE"
  281.     to  use  the  configuration  provided  with  STREW.  This will be read
  282.     in and displayed on the screen.  For now we will just use  this  file.
  283.     Press  Escape  to  indicate  that  you have made all changes you want.
  284.     You will then be prompted whether you want to change  the  record  and
  285.     field  separators used for output.  Press <rtn> to indicate no change.
  286.     You will then get a final chance to reedit the screen you have entered
  287.     or  to  confirm  it is right.  Press <rtn> to indicate that the screen
  288.     is to saved as displayed.
  289.  
  290.  
  291.  
  292.  
  293.  
  294.  
  295.  
  296.     File STREW.TXT, Reformated from STREW.DOC                            Page 7
  297.  
  298.  
  299.     You will then get a second screen of configuration parameters.   Press
  300.     Escape  to indicate you are done making changes, then <rtn> to confirm
  301.     that the screen is to be  saved  in  the  configuration  file.   STREW
  302.     will  then  report  that  it  is saving the file and return you to the
  303.     main menu.  Here select option S by entering "S<rtn>" and then respond
  304.     "PLAN.DAT<rtn>"  for  the  file  to  strew.   STREW will then read the
  305.     file and display it according to your spefication.  Notice  how  STREW
  306.     labels  the  fields  in  the  file  and displays them in a format easy
  307.     to read.  Press Escape to indicate  that  you  are  done  editing  the
  308.     file.  Then do not save the file; abort by pressing "A<rtn>".
  309.  
  310.     Now  go  back  and  reconfigure  PLAN.DAT.  Change the field separater
  311.     from nothing to space.  Indicate you want to change the field separator;
  312.     then you will be prompted for how many characters are in the separator.
  313.     Indicate 1.  Then you will be prompted to type the  character:   press
  314.     the  space  bar.   Do  not change the record separator.  On the second
  315.     screen of parameters  change  the  column  labeled  "QUOTE?" from  "N"
  316.     to  "Y"  for  rows  1,2,  and 4 (the three text fields).  After saving
  317.     the configuration, strew PLAN.DAT; only  this  time  really  strew  it
  318.     instead  of  aborting.   After  strewing, select "Q" for quit.  At DOS
  319.     then do "TYPE PLAN.DAT<rtn>" and then "TYPE CC1".  Note how CC1 inserted
  320.     a space between the fields in PLAN.DAT,  and  quotes  are  around  the
  321.     right fields.
  322.  
  323.     Now  you want to split PLAN.DAT according to cost center.  To do this,
  324.     change the configuration to indicate that  the  STREW  field  will  be
  325.     read  from  the  file,  save  it,  and then strew PLAN.DAT again.  Now
  326.     the file will be strewed to CC011, CC040, and CC090.  Type  each  file
  327.     at  DOS  to  confirm  that  the records in each file are for the right
  328.     cost center.
  329.  
  330.  
  331.  
  332.  
  333.  
  334.  
  335.  
  336.  
  337.     File STREW.TXT, Reformated from STREW.DOC                            Page 8
  338.  
  339.  
  340.     LIMITATIONS
  341.  
  342.     STREW can edit up to 99 fields.  A field must fit on  the  screen  and
  343.     therefore  cannot  be  more  than  80 characters.  Up to 99 horizontal
  344.     screens can be associated with a file.  The maximum  number  of  lines
  345.     or  rows  that  STREW  can  display will depend on how many columns or
  346.     fields there are.  STREW stores the fields in arrays, and  dynamically
  347.     allocates  whatever  space it has left to rows.  In its current state,
  348.     1800 slots are left open, so that 10 fields can have up to  180  rows,
  349.     and 4 fields has a maximum of 450 rows.
  350.  
  351.     Strew  accepts  as  input  files  only  those where the fields read in
  352.     are in a fixed position in each record.  However,  fields  beyond  the
  353.     last  one  read  in  can  have  any length, including variable length.
  354.     The input file needs to be fixed length up  to  the  last  field  read
  355.     in.
  356.  
  357.     Strew  can  read  only  files where the records have a carriage-return
  358.     line-feed as a delimiter.  However,  STREW  will  read  input  records
  359.     of any length.
  360.  
  361.     The  fields  to  be  read  in  are specified by beginning position and
  362.     length.  The fields read in cannot overlap.  For example,  you  cannot
  363.     specify  to read in both date in columns 8-12 and also year in columns
  364.     11-12.
  365.  
  366.     STREW requires that the file to be edited  be  on  he  same  drive  as
  367.     its configuration file.
  368.  
  369.  
  370.     INSTALLATION
  371.  
  372.     STREW  is  compileable,  and except for testing changes, should be run
  373.     compiled rather than interpreted.  The interpreted version can  easily
  374.     experience  long  delays  as  garbage  string  space is reclaimed.  If
  375.     you are using the compiled version type in "STREW" to run the program.
  376.     For  the  interpreted  version, type "BASICA /s:512 STREW".  The first
  377.     thing you should do is set up the configuration for your applications:
  378.     especially  the  drive  identifiers  if you are going to use STREW for
  379.     RBBS.
  380.  
  381.  
  382.  
  383.  
  384.  
  385.  
  386.  
  387.  
  388.     File STREW.TXT, Reformated from STREW.DOC                            Page 9
  389.  
  390.  
  391.     RUNNING STREW
  392.  
  393.     In its compiled form, STREW will accept parameters with the DOS prompt.
  394.     At DOS the format is 
  395.  
  396.                        STREW <FILE> <option>
  397.  
  398.     where the file is "RBBS" to do an RBBS strew, or the file to be strewed.
  399.     By specifying "Q" for the option, STREW  will  automatically  quit  to
  400.     DOS  after  strewing  the  file.   The option has no effect unless the
  401.     file is configured to run batch.  For example
  402.  
  403.                       STREW PLAN.DAT Q
  404.  
  405.     says to strew the file named "PLAN.DAT"  and  to  quit  to  DOS  after
  406.     strewing it.
  407.  
  408.     To  run  STREW  as  a  batch  program rather than interactively, first
  409.     configure a file for STREW.  In the configuration, specify the maximum
  410.     number of lines to be displayed on the screen to be zero.
  411.  
  412.     Where  the  lines  are  to  be strewed can be specified interactively,
  413.     using the full screen editor in STREW, or accepting to default directory
  414.     when all lines go to the same file, or using a field within the records.
  415.     When the last option is used, the strew field must be the first specified
  416.     to be read in and displayed on the screen. 
  417.  
  418.  
  419.     HOW STREW NORMALLY WORKS
  420.  
  421.     The user is initially presented with the options 
  422.  
  423.         R)bbs...S)trew...C)onfigure...Q)uit ([R],S,C,Q)
  424.  
  425.     In all menu choices, the default is shown in brackets  ([x])  and  can
  426.     be  gotten  just by pressing RETURN.   R means to load the upload file
  427.     in RBBS for both editing and strewing.  S means to strew  an  existing
  428.     file  with the option to edit the lines in it.  C means to set certain
  429.     parameters in STREW for a file.
  430.  
  431.     Strew can edit files of any size.  However, it can hold only a limited
  432.     number  of  lines  in  memory.   STREW  will read all it can hold; and
  433.     page in the remaining part of the file after the editing on the current
  434.     part is done.  You can limit the amount STREW reads  it  at  one  time
  435.     if  you  find it convenient to work with smaller portions of the file.
  436.     Just specify the maximum number of screens of data to hold  in  memory
  437.     at a time in the configuration.
  438.  
  439.  
  440.  
  441.  
  442.  
  443.  
  444.  
  445.     File STREW.TXT, Reformated from STREW.DOC                           Page 10
  446.  
  447.  
  448.     A full screen of entries from a file is presented.  The editing commands
  449.     that  can then be used are very similar to the editor in BASIC, except
  450.     that the data is divided into fields.  For strewing, the user basically
  451.     assigns the lines to directories by placing identifiers for the  files
  452.     to strew to in the far left field.  The identifier is used as a suffix
  453.     attached to a filename which the user  specifies.   The  RBBS  prefix,
  454.     for  example,  is  usually  DIR.   A  line can be strewed to more than
  455.     one file by separating the  identifiers  by  a  comma.   For  example,
  456.     to  specify  that an entry is to be written to DIR1, DIR21, and DIR98,
  457.     enter in the leftmost field
  458.  
  459.                                1,21,98
  460.  
  461.     The number of spaces reserved on the screen  for  files  to  strew  to
  462.     can be fixed in the configuration.  The user can specify which displayed
  463.     fields  are  to  be  editable.   Non-editable fields cannot be reached
  464.     by moving the cursor around on the screen.   Page  Up  and  Page  Down
  465.     take  the  user forward and back a screen.  When done specifying where
  466.     the lines are to be strewed to and changing the contents, press Escape.
  467.  
  468.     In RBBS mode the format of lines presented on the screen is
  469.  
  470.         <directory #'s> <filename> <date uploaded> <description>
  471.  
  472.     The size of the file is not displayed, but it is read in  and  written
  473.     out.
  474.  
  475.  
  476.  
  477.  
  478.  
  479.  
  480.  
  481.  
  482.     File STREW.TXT, Reformated from STREW.DOC                           Page 11
  483.  
  484.  
  485.     CONFIGURING STREW
  486.  
  487.     STREW  has  to know three things:  how to read in a file, what editing
  488.     to allow on the file read in, and how to output the file.  The operating
  489.     parameters for each file to be edited are  stored  separately.   Strew
  490.     reserves  the  extension  "STW" for its configuration file.  Hence the
  491.     files to edit must  have  distinct  prefixes.   File  "TEST.DAT"  will
  492.     have  its  strew  configuration  stored  in  "TEST.STW".  For RBBS the
  493.     configuration is not associated with the name of the file to be edited,
  494.     but instead is stored in "RBBS.STW".  You do  not  have  to  configure
  495.     a  file  before  trying  to strew it.  STREW will detect that there is
  496.     no configuration and give you the chance to create it.
  497.  
  498.     Everything is parameterized in STREW, making  it  easy  for  the  user
  499.     to specify the operating constants, such as a default file for entries
  500.     to be written to, the number of lines displayed  on  the  screen,  and
  501.     the  help  description  to  be  associated with each directory for use
  502.     with RBBS.
  503.  
  504.     To run the configuration, just choose  option  C  on  the  main  menu.
  505.     You  will  then  be  prompted for the file name you want to configure.
  506.     To set up STREW for use with RBBS, reply  "RBBS".   For  other  files,
  507.     just give the prefix of the name of the file (no extension).
  508.  
  509.     If  a  previous  configuration  exists  for that file, STREW will read
  510.     it in and allow you to edit and  replace  it.   If  none  exists,  you
  511.     will  be  given  the  option  to  read in another file's configuration
  512.     to use as a basis for the  new  one.   A  default  configuration  will
  513.     be provided if no other basis is used.
  514.  
  515.  
  516.     GENERAL STREW CONFIGURATION
  517.  
  518.  
  519.  
  520.  
  521.  
  522.  
  523.  
  524.     File STREW.TXT, Reformated from STREW.DOC                           Page 12
  525.  
  526.  
  527.     The  parameters  used  for a file with the "S" option on the main menu
  528.     are as follows.
  529.  
  530.     1.   Number of columns of data to read.   Number  of  fields  to  read
  531.     from  the  input  file.   Up to 99 fields.  However, one field must be
  532.     used to specify where to strew line to.  If the  strew  field  is  not
  533.     read from the file, only 98 fields can be read from the file.
  534.  
  535.     2.   Default  suffix  to strew to.  The file to strew to is determined
  536.     by appending the value in the strew field to the  strew  file  prefix.
  537.      For  example,  appending  suffix  "1" to prefix "STRU" to get "STRU1".
  538.     The default suffix is what will be used  if  no  other  is  specified.
  539.     This  will  be  displayed  in  the  strew field if it is not read from
  540.     the file.
  541.  
  542.     3.   Maximum lines per screen.  How many lines of data will be displayed
  543.     on the screen.  Up to 20.  If you specify 0 lines, the file you specify
  544.     will be automatically strewed according  to  the  directions  in  your
  545.     configuration,  and  the  lines  will  not be displayed on the screen.
  546.     This implies that all lines are  a  pre-specified  file  -  determined
  547.     by  the  default  suffix if the strew field is not read from the file,
  548.     otherwise by the value in the strew  field.   This  is  most  valuable
  549.     when  simply  reformatting an entire file, and makes STREW a good tool
  550.     in regular production runs where the same processing is  done  period-
  551.     ically.
  552.  
  553.     4.   Maximum  number  of  screens  of data.  STREW will hold in memory
  554.     more data than it can display on the screen at  any  one  time.   This
  555.     is  the  maximum  number  of  screens  of data it is to hold in memory
  556.     at one time.  There is a real maximum  which  depends  on  the  number
  557.     of fields, but you can specify fewer than this.
  558.  
  559.     5.   Prefix  of  files to strew to.  A string of 7 characters or less.
  560.     Must be a valid file name.  Value in strew field is appended to prefix
  561.     to determine where line is strewed to.
  562.  
  563.     6.   Length  of  field  identifying  strew  (at least 1).  Can specify
  564.     that a line is to strewed to more  that  one  file.   Separate  values
  565.     by  a  comma.   For  example, to strew a line to A and B, put in "A,B"
  566.     in the strew field.  The strew is always the  leftmost  field  of  any
  567.     line.   When  strew  field  is  read from the file, a legal value must
  568.     be put in but it will be ignored in favor of the length of  the  strew
  569.     field.
  570.  
  571.     7.   Whether  read  strew  field  from  the  file.  The value used for
  572.     strewing can be in the file read in, or can  be  an  additional  field
  573.     added  on  the  screen.   The  strew  field is always displayed on the
  574.     far left of each line, and when read  from  the  file  must  therefore
  575.     be the first specified in the fields to be read.
  576.  
  577.  
  578.  
  579.  
  580.  
  581.  
  582.     File STREW.TXT, Reformated from STREW.DOC                           Page 13
  583.  
  584.  
  585.     8.   Whether output field is fixed length or variable.  The difference
  586.     is that when fixed length, each field will  be  filled  to  the  right
  587.     if  its  edited  length  is shorter than the maximum field length, and
  588.     if variable length, each field will be written out exactly  as  edited
  589.     with  no  characters  added.   Each  fixed  length field therefore has
  590.     its maximum length on the screen be its actual length when written.
  591.  
  592.     9.   Field separator.  A string to be  inserted  between  each  field.
  593.     This  can  be  any  string,  including  the null (empty) string, which
  594.     amounts to nothing being  inserted.   Some  strings  have  no  natural
  595.     way  of  being  displayed  on the screen, such as a carriage return or
  596.     line feed.  These will be shown as  "<CR>"  and  "<LF>"  respectively.
  597.     To  distinguish  a  space  from  nothing,  a single space will display
  598.     as "<sp>" and an empty separator will  be  shown  as  "<none>".   When
  599.     specifying  the  characters  in  a  string, those that cannot be typed
  600.     by striking a key (the ASCII characters that do  not  have  keys)  can
  601.     be  entered  by  holding  down  the  alt key and tapping out the ASCII
  602.     numeric code using the numeric  keypad.   For  example,  to  get  just
  603.     line  feed  as  a  separator,  hold  down alt while pressing 1 then 0,
  604.     and release alt (10 is the numeric  code  for  line  feed).   See  the
  605.     IBM BASIC manual for a list of the numeric codes and how these characters
  606.     will  be  displayed  on  the  screen.   The default field separator is
  607.     none.
  608.  
  609.     10.  Record separator.  This is a string to be  inserted  at  the  end
  610.     of  each  line  written  out.   Entered  same  way as field separator.
  611.     The standard record separator for text  files  (those  you  can  type,
  612.     read, and print - the standard characters you see on typewriter keyboards)
  613.     is  a  carriage  return  followed  by a line feed (ASCII 13,10).  This
  614.     is the default record separator.
  615.  
  616.     Each field read in from the input field  requires  that  7  additional
  617.     parameters  be  specified.   The  fields  read in will be displayed on
  618.     the screen in the same order they are specified.  Enter  these  fields
  619.     just as you want to see them on the screen.  The parameters are
  620.  
  621.     11.  Title.   This  is  the  column  label to be displayed as a header
  622.     for the field.  Each field is displayed in a  column  on  the  screen,
  623.     with  the  same field from different lines displayed underneath:  just
  624.     like in a spreadsheet.  This can be a maximum of 10 characters.
  625.  
  626.     12.  Width.  The maximum width of  the  column  used  to  display  the
  627.     field  on  the  screen.   Also,  the maximum length the field can have
  628.     when written out.  Need not be the same size as  the  input  field  in
  629.     the file read.
  630.  
  631.     13.  Whether  field  is  editable.   If editable, you are permitted to
  632.     change what is in the field from what is read in.   If  not  editable,
  633.     the field will be displayed but you cannot change it.
  634.  
  635.  
  636.  
  637.  
  638.  
  639.  
  640.     File STREW.TXT, Reformated from STREW.DOC                           Page 14
  641.  
  642.  
  643.     14.  Starting  position  of  field in input record.  Each input record
  644.     is assumed to consist of a series  of  characters,  with  each  record
  645.     (or  line)  being separated by a carriage-return line-feed.  The field
  646.     is assumed to start in the same position in each record.   The  fields
  647.     are displayed on the screen in the order they are entered.  For example,
  648.     if  you  want  the  third field in the input record to be displayed in
  649.      the first column, specify the beginning  column  of  the  third  field
  650.     for the first entry.
  651.  
  652.     15.  Number  of characters in field in input record.  Each input field
  653.     is assumed to have the same length.
  654.  
  655.     16.  Order fields are to be written out.   The  fields  displayed  can
  656.     be  written out in any order.  You must distinguish the order in which
  657.     the fields occur in the input record from the order they are displayed
  658.     on  the  screen  and  from the order they are written out.  This field
  659.     specifies which order the fields displayed on the  screen  are  to  be
  660.     written  out.   You  can  therefore rearrange the output fields in any
  661.     way desired.  You may want to display some fields on  the  screen  but
  662.     not  write  them  out.   For  such  fields specify the output order to
  663.     be zero (0).  The value 1 means that this is the first field to output,
  664.     2 the second, 3 the third, etc.
  665.  
  666.     17.  Whether field is to be put  inside  double  quotes  when  written
  667.     out.   You  will  often  want  to  read the data into another program,
  668.     and many programs insist  that  text  be  distinguished  from  numbers
  669.     by  being  enclosed  in  quotes.   Also,  if embedded spaces can occur
  670.     inside a text field, the entire field must often be enclosed in quotes
  671.     in order to be read properly.
  672.  
  673.  
  674.     RBBS CONFIGURATION
  675.  
  676.     The parameters for use with RBBS are as follows:
  677.  
  678.     1.   RBBS  file  to  be edited.  Name of file that contains line items
  679.     which are to be dispersed by  appending  to  various  files.   If  you
  680.     don't  want  a  fixed  file  and would prefer to specify the file each
  681.     time you invoke option R, make this entry empty.
  682.  
  683.     2.   Drive containing RBBS directory files, which  are  the  files  to
  684.     be appended to.
  685.  
  686.     3.   Drive(s)  containing  RBBS  uploaded  files.  These are where the
  687.     files are located that are listed in the RBBS file to be edited.
  688.  
  689.  
  690.  
  691.  
  692.  
  693.  
  694.  
  695.     File STREW.TXT, Reformated from STREW.DOC                           Page 15
  696.  
  697.  
  698.     4.   Name of file of skipped lines.  STREW tries to identify  comments
  699.     in  the  RBBS  file to be edited.  Any lines it identifies as not file
  700.     entries are skipped and are written to this file.   The  operator  can
  701.     then  view  the  skipped  lines  to  see whether they should have been
  702.     skipped.
  703.  
  704.     5.   Default RBBS directory suffix of  files  that  lines  are  to  be
  705.     written to.  Set to file that you put most of your lines in.
  706.  
  707.     6.   Maximum  number  of  lines  you  want displayed on a page (1-20).
  708.  
  709.     7.   Maximum number of pages of lines that you  want  held  in  memory
  710.     at  any  time  for editing.  There is only so much room in the program
  711.     in arrays to store such information.   The  maximum  number  of  lines
  712.     that  will  be  read  in is item 6 times item 7.  STREW tracks whether
  713.     it has finished reading to file to be edited and  will  swap  in  more
  714.     pieces  of  it after the current piece is edited and saved.  Currently
  715.     you can move only forward through a file.  Once  a  piece  of  a  file
  716.     is  processed,  you  cannot  back  up (because once a file is strewed,
  717.     there is no recovery).
  718.  
  719.     8.   Prefix to be used to name files that are appended  to.   Normally
  720.     "DIR" in RBBS.
  721.  
  722.     9.   Length  of  space  reserved  on  screen  for specifying number of
  723.     files to strew to.  Limits number of  files  that  can  be  specified.
  724.     STREW  accepts  only  the  numbers 1-99 for such entries, and multiple
  725.     entries must be separated by a comma.
  726.  
  727.     10.  Whether want to be in insert or replace  mode  when  first  enter
  728.     editor.  Use Insert key to toggle between.
  729.      
  730.     11.  A  short  12  character  phrase  to  be associated with the files
  731.     appended to:  up to 99 such entries.  Used with Alt-D  as  a  reminder
  732.     of what types of entries are stored in each directory.  
  733.  
  734.  
  735.  
  736.  
  737.  
  738.  
  739.  
  740.  
  741.  
  742.     File STREW.TXT, Reformated from STREW.DOC                           Page 16
  743.  
  744.  
  745.     THE EDITING COMMANDS
  746.  
  747.  
  748.     <BACKSPACE>   - Delete character to left of cursor and close text
  749.  
  750.     DEL           - Delete character at cursor and close text
  751.  
  752.     <RETURN>           - Go to next field (to right; if at far right, goes
  753.                     down a line to field at far left)
  754.  
  755.     HOME          - Go to top left corner field of screen.
  756.  
  757.     <UP ARROW>     Go up a line; keep in same field but go to first column
  758.                    position.
  759.  
  760.     <DOWN ARROW>  - Go down a line; keep in same field.
  761.  
  762.     PgUp           Go  up  a  page.   Stay  on same relative entry.  If on
  763.                     first page, go to last page.
  764.  
  765.     PgDn           Go down a page.   Stay  on  same  relative  entry.   If
  766.                    on last page, go to first page.
  767.  
  768.     Ins               - Toggles between Insert and Replace modes.  Default
  769.                     mode is replace.
  770.  
  771.     End           - Go to far right of current field.
  772.  
  773.     <Tab>          Jump forward.  If currently at far left editable field,
  774.                    goes  to  far  right  editable  field.  If currently at
  775.                    far right editable field,  goes  down  a  line  to  far
  776.                    left  editable  field.   In RBBS mode Tab-Tab therefore
  777.                    advances the user through  the  fields  that  are  most
  778.                    often  edited  -  from  the  files  to write to, to the
  779.                    description, to the files to  write  to  for  the  next
  780.                    line, etc.  
  781.  
  782.     Alt-D          Gives list of all 99 directory files with a user-supplied
  783.                    description  of up to 12 characters.  Use for reviewing
  784.                    what numbers to associate with  what  files.   For  use
  785.                    only with RBBS.
  786.  
  787.     Alt-V          View  file  currently  positioned  on.  Applies only in
  788.                    RBBS mode.  May need  to  view  information  to  decide
  789.                    where to strew files to.  You can view any file, although
  790.                    executable files will look very strange on the screen.
  791.  
  792.  
  793.  
  794.  
  795.  
  796.  
  797.  
  798.  
  799.  
  800.     File STREW.TXT, Reformated from STREW.DOC                           Page 17
  801.  
  802.  
  803.     USING STREW WITH RBBS
  804.  
  805.     Strew  comes  preconfigured  with  an  option to help sysops using the
  806.     host program Remote Bulletin Board System (RBBS) to manage  the  files
  807.     uploaded.   To  configure  STREW for RBBS, select option C on the main
  808.     menu and then use "RBBS" for the file to configure.
  809.  
  810.     Strew will correctly read the file format  in  all  versions  of  RBBS
  811.     from  12.1  or  higher.   Strew  will write out the format in the form
  812.     that the new ("N") command expects.
  813.  
  814.     Many sysops put comment text in directories.  Strew will try to detect
  815.     such  lines,  and  will exclude them from the lines to be edited.  The
  816.     user can check to see whether only  comment  lines  were  excluded  by
  817.     inspecting  a  file  where  are  excluded lines are written.  The file
  818.     name is specified in the RBBS configuration.
  819.  
  820.      You may find that STREW includes some  lines  as  filenames  that  are
  821.     really  comments.   You  can prevent such lines from being written out
  822.     or strewed simply by removing all  characters  from  the  strew  field
  823.     that  specifies  where  to  strew  the  line to.  An empty strew is no
  824.     strew.  A better permanent solution is  to  change  the  comment  line
  825.     so that STREW will properly interpret it as a comment.  You can either
  826.     (a) make the comment line 32 characters or fewer, or (b) put a non-blank
  827.     character in columns 22, 23, or 13.
  828.  
  829.     Some sysops in one single directory have sub-lists grouped  by  topic.
  830.     For  example,  programming  aids  may be divided by language in BASIC,
  831.     TURBO PASCAL, and C.  Strewing all  related  files  to  the  end  will
  832.     then  not  place  the  file  in its proper sublist.  Strew can be used
  833.     with sublists by maintaining each sublist as a separate working directory
  834.     with its header at the top, strewing to each working  directory,  then
  835.     copying  all  the  working  directories together.  A single batch file
  836.     could automate the entire process.  For example, dir38 could  be  used
  837.     for basic, dir39 for turbo, and dir40 for C.  None of these directories
  838.     are  listed  in  the  master directory.  Instead there is only a dir15
  839.     called "Programming Aids".  Then let STREW be invoked by the following
  840.     batch file.
  841.  
  842.                         STREW
  843.                         COPY DIR38+DIR39+DIR40 DIR15
  844.  
  845.     Sysops  who  maintain  sorted  lists  of files by name will find STREW
  846.     to be less useful.   STREW will not  properly  insert  the  new  files
  847.     in the proper order, but instead only appends.  If you have an independent
  848.     sort  routine,  the  file  can  be  resorted after strewing.  A future
  849.     release of strew may support merging the lines  instead  of  appending
  850.     them.
  851.  
  852.  
  853.  
  854.  
  855.  
  856.  
  857.  
  858.     File STREW.TXT, Reformated from STREW.DOC                           Page 18
  859.  
  860.  
  861.     The  records  you  append  may  fail to appear when you type the file.
  862.     There is then a control-Z in your file between  the  appended  records
  863.     and  the  rest  of  the file.  A control-Z is interpreted by DOS as an
  864.     end-of-information mark.  This can happen when you  edit  these  files
  865.     and  save  them.   I do not know exactly what causes this problem, but
  866.     there are filler characters after the  control-Z  that  apparently  do
  867.     not have a proper length, so that BASIC in its append mode misinterpretes
  868.     where the file ends and appends after rather than before the control-Z.
  869.  
  870.     Append  will  work  properly  when  the  last character in the file is
  871.     a control-Z with no  filler;  and  sometimes  when  there  is  filler.
  872.     Either  let  BASIC  create  these files and never change their length,
  873.     or use a text editor that ignores the  control-Z  and  lets  you  edit
  874.     all characters in the file (remove the filler after the control-Z).
  875.  
  876.  
  877.  
  878.  
  879.  
  880.  
  881.  
  882.  
  883.     File STREW.TXT, Reformated from STREW.DOC                           Page 19
  884.  
  885.  
  886.     MODIFYING STREW
  887.  
  888.     The  source  code for STREW is provided so that users can easily track
  889.     down problems they find in the program or add enhancements  that  they
  890.     need.   The  IBM BASIC compiler is needed if anything other than small
  891.     data sets are to be used.  The interpreter is most useful for  testing
  892.     modifications.
  893.  
  894.     STREW  can  easily  be  modified  to  allow more than 99 fields.  Just
  895.     change all of the occurences of 99  to  the  larger  number  near  the
  896.     beginning  of  the  program.   The maximum number of lines allowed can
  897.     also be expanded by increasing the size  of  the  dimension  statement
  898.     for array E$.
  899.  
  900.     STREW uses an embedded assembler program to get passed DOS parameters.
  901.     This code will not run properly under the  interpreter  and  therefore
  902.     is  commented  out  in  the source code.  Whenever you want to compile
  903.     the program, you must therefore  restore  the  line  by  removing  the
  904.     single quote at the beginning.
  905.  
  906.     The  IBM  BASIC  and  its  compiler have severe limitations which make
  907.     it a frustrating programming  language.   Advanced  DOS  features  are
  908.     not  supported,  screen  input/output  is  very sluggish, the compiler
  909.     does not support all features available  in  the  interpreter,  string
  910.     space  is  very  wastefully  used  and poorly reclaimed, and there are
  911.     no true  subprograms  with  passed  parameters  and  local  variables.
  912.     The  author has had to do many things to optimize the code which would
  913.     not have to be done in a better  designed  language.   In  many  cases
  914.     this made the code less straight forward and more difficult to follow.
  915.     Another language would definitely had been used if  the  product  were
  916.     sold  commercially,  but  IBM  BASIC  was still used because it is the
  917.     only programming language widely available in the user community.
  918.     An external assembler program was used to  change  the  speed  of  the
  919.     full screen display from slow to fast.
  920.  
  921.     The  source  code is supplied in the form for running under the inter-
  922.     preter.  Two lines in it have to be changed when  compiling.   In  one
  923.     a comment is added at the beginning of a line and in another a beginning
  924.     comment  is  removed.   These  lines  are noted by comments in the the
  925.     code.
  926.  
  927.     The author keeps the source code on drive B and the compiler on  drive
  928.     A.  The following batch file does the compiling and linking.
  929.  
  930.               A:BASCOM B:STREW /E
  931.  
  932.     This file called STREW.DOC downloaded at 17:18:45 on 12-08-1984
  933.  
  934.